.template-wrapper {
    display: flex;
    height: 100vh;
    background-color: #f5f5f5;

    .sidebar {
        width: 280px;
        background-color: #fff;
        border-right: 1px solid #e8e8e8;
        display: flex;
        flex-direction: column;

        .sidebar-content {
            flex: 1;
            padding: 16px 0;

            .menu-item {
                display: flex;
                align-items: center;
                padding: 12px 24px;
                color: #666;
                cursor: pointer;
                transition: all 0.3s;

                &:hover {
                    background-color: #f0f0f0;
                }

                &.active {
                    background-color: var(--btnBG);
                    color: #fff;
                    border-right: 3px solidvar(--btnBG);
                    border-radius: 30px;
                }

                .anticon {
                    margin-right: 12px;
                    font-size: 16px;
                }
            }
        }
    }

    .main-content {
        flex: 1;
        padding: 24px;
        overflow-y: auto;
        position: relative;

        .sub-nav {
            background-color: #fff;
            border-radius: 8px;
            padding: 24px;

            .custom-tabs {
                .ant-tabs-nav {
                    margin-bottom: 24px;
                }

                .ant-tabs-tab-btn {
                    color: #009999;
                    font-size: 16px;
                    font-weight: 600;
                }

                .ant-tabs-ink-bar {
                    // background-color: #009999;
                    display: none;
                }
            }

            .add-template-btn-wrapper {
                position: absolute;
                right: 0;
                top: -95px;
                z-index: 1;
                display: flex;
                justify-content: center;
                align-items: center;
                margin-bottom: 16px;
                border: 1px solid #c4c4c4;
                width: 80px;
                height: 36px;
                cursor: pointer;
                font-size: 15px;

                .anticon {
                    font-size: 20px;
                    color: #009999
                }
            }

            .template-table {
                .file-icon {
                    width: 32px;
                    height: 32px;
                    border-radius: 4px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-right: 8px;

                    &.word {
                        background-color: #2b579a;
                        color: #fff;
                    }

                    &.excel {
                        background-color: #217346;
                        color: #fff;
                    }
                }

                .download-btn {
                    border: none;
                }
            }
        }
    }
}

// 上传弹窗样式
.upload-modal-content {
    .upload-tip {
        color: #3db3b4;
        font-size: 16px;
        margin-bottom: 12px;
    }

    .upload-area {
        border: 2px dashed #d9d9d9;
        border-radius: 8px;
        text-align: center;
        cursor: pointer;
        width: 150px;
        height: 150px;
        transition: all 0.3s;
        margin-bottom: 16px;

        &:hover {
            border-color: #1890ff;
            background-color: #fafafa;
        }

        .upload-icon {
            font-size: 48px;
            color: #d9d9d9;
            margin-bottom: 16px;

            .anticon {
                font-size: 48px;
            }
        }

        .upload-text {
            color: #666;
            font-size: 14px;
        }
    }

    .selected-file {
        display: flex;
        align-items: center;
        padding: 12px;
        background-color: #f6ffed;
        border: 1px solid #b7eb8f;
        border-radius: 6px;
        margin-bottom: 24px;

        .anticon {
            color: #52c41a;
            margin-right: 8px;
        }

        span {
            flex: 1;
            color: #262626;
        }

        .remove-btn {
            color: #ff4d4f;
            padding: 0;
            height: auto;

            &:hover {
                color: #ff7875;
            }
        }
    }

    .modal-footer {
        text-align: right;
        padding-top: 16px;
        border-top: 1px solid #f0f0f0;

        .cancel-btn {
            border-color: var(--btnBG);
            color: var(--btnBG);

            &:hover {
                border-color: var(--btnBG);
                color: var(--btnBG);
            }
        }

        .save-btn {
            background-color: var(--btnBG);
            border-color: var(--btnBG);

            &:hover {
                background-color: var(--btnBG);
                border-color: var(--btnBG);
            }

            &:disabled {
                background-color: #f5f5f5;
                border-color: #d9d9d9;
                color: #bfbfbf;
            }
        }
    }
}

// 响应式设计
@media (max-width: 768px) {
    .template-wrapper {
        flex-direction: column;

        .sidebar {
            width: 100%;
            height: auto;
        }

        .main-content {
            padding: 16px;
        }
    }
}